clear
clc

% load trainig file
load('trainedData.mat');

% read the test images
images = readDeliverableImages('I:\new_test\');

% validation part
[x,y,z] = trainData(images);
test_matrix = [x' y' z'];

% classify images
classes_1 = discriminantClassifier(train, test_matrix);
classes_2 = kNearestNeighborClassifier(train, test_matrix);
classes_3 = naiveBayesClassifier(train, test_matrix);

% vote for the best of both classifiers
classes = votingFunction([ classes_2 classes_3]);

% write the output of the voting function fo classifiers in a file
writeOutputToFile(classes);

% clear all memory
clear